<?php

require_once ('library/My/Form/AjaxForm.php');

class Form_Commission_SetRole extends My_Form_AjaxForm {
	
	
	
	public function __construct($selectName,$jqueryParams,$default = '0',$options = null) {
		parent::__construct ($options);
				
		$this->setJqueryParams($jqueryParams);		
		
		
		$select = new Zend_Form_Element_Select($selectName);
		$select->addMultiOptions(My_CommissionRole::getAllRoleTypes())
		->setDecorators(array('ViewHelper'))
		->setValue($default);	
		
		$this->addAjaxableElements(array($select));
		$this->setSender($select,'onchange');
		
		$this->addElements(array($select));
	}	
}